{$CLEO .qa}
{$USE CLEO+}
{$USE Audio}
{$USE newOpcodes}

0000: NOP

script_name "Clipqa"

// By ArtemQa146

0085: 4@ = 0@ // (int)

Model.Load(2966)
038B: load_requested_models
0D0B: get_actor $PLAYER_ACTOR bone 24 matrix_pointer_to 0@ // IF and SET
0D0A: store_coords_to 1@ 2@ 3@ from_matrix 0@ with_offsets 1@ 2@ 3@
create_object_no_save 2966 at 1@ 2@ 3@ offset 0 ground 0 to 0@
0F04: create_render_object_to_object_from_special 0@ special_model 4@ offset 0 0 0 rotation 0 0 0 store_to 1@
0172: 1@ = actor $PLAYER_ACTOR Z_angle
1@ -= 270.0
0177: set_object 0@ Z_angle_to 1@
08D2: object 0@ scale_model 0.0
model.Destroy(2966)
05A1: set_object 0@ rotation_velocity_about_an_axis 1.0 1.0 0.0 through_center_of_body
timera = 0

repeat
wait 0
0400: store_coords_to 1@ 2@ 3@ from_object 0@ with_offset 0.0 0.0 0.0
02CE: 1@ = ground_z_at 1@ 2@ 3@
0063: 3@ -= 1@  // (float)
    if
        3@ <= 0.15
    then
        0208: 1@ = random_float_in_ranges 0.0 359.0
        0453: set_object 0@ XY_rotation 90.0 0.0 angle 1@
        0382: set_object 0@ collision_detection 0
        0400: store_coords_to 1@ 2@ 3@ from_object 0@ with_offset 0.0 0.0 0.0
        02CE: 3@ = ground_z_at 1@ 2@ 3@
        01BC: put_object 0@ at 1@ 2@ 3@
        0AC1: 2@ = load_audio_stream_with_3d_support "SQ/IMP2.mp3" // IF and SET
        0AC3: link_3d_audio_stream 2@ to_object 0@
        0AAD: set_audio_stream 2@ state 1
        wait 200
        0AAE: remove_audio_stream 2@
        break
    end
until timera > 2000
01C4: remove_references_to_object 0@ // This object will now disappear when the player looks away

0A93: terminate_this_custom_script

